#include <iostream>
using namespace std;
int main()
{
    int a[101],b[101],c[101],i,j,n,m,temp;
    while (cin>>n>>m)
    {
        if (n==0&&m==0)break;
        for (i=0;i<n;i++){cin>>a[i];c[i]=0;}
        for (i=0;i<m;i++)cin>>b[i];
        for (i=0;i<n;i++)
            for (j=i+1;j<n;j++)
                if (a[i]>a[j])
                {
                    temp=a[i];
                    a[i]=a[j];
                    a[j]=temp;
                }
        for (i=0;i<n;i++)
            for (j=0;j<m;j++)
                if (a[i]==b[j])c[i]=1;
        temp=0;
        for (i=0;i<n;i++)
        {
            if (c[i]==0)
            {
                temp=1;
                cout<<a[i]<<' ';
            }
        }
        if (temp==0)cout<<"NULL";
        cout<<endl;
    }
    return 0;
}
